package net.flyinggroup.actuator;

import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class AppModeInfoProvider implements InfoContributor {
    private final Random rnd = new Random();

    @Override
    public void contribute(Info.Builder builder) {
        builder.withDetail("application-mode", rnd.nextBoolean() ? "experimental" : "stable");
    }
}
